# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Monitoring.V3.Model.NotificationChannelDescriptor do
  @moduledoc """
  A description of a notification channel. The descriptor includes the properties of the channel and the set of labels or fields that must be specified to configure channels of a given type.

  ## Attributes

  *   `description` (*type:* `String.t`, *default:* `nil`) - A human-readable description of the notification channel type. The description may include a description of the properties of the channel and pointers to external documentation.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - A human-readable name for the notification channel type. This form of the name is suitable for a user interface.
  *   `labels` (*type:* `list(GoogleApi.Monitoring.V3.Model.LabelDescriptor.t)`, *default:* `nil`) - The set of labels that must be defined to identify a particular channel of the corresponding type. Each label includes a description for how that field should be populated.
  *   `launchStage` (*type:* `String.t`, *default:* `nil`) - The product launch stage for channels of this type.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The full REST resource name for this descriptor. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] In the above, [TYPE] is the value of the type field.
  *   `supportedTiers` (*type:* `list(String.t)`, *default:* `nil`) - The tiers that support this notification channel; the project service tier must be one of the supported_tiers.
  *   `type` (*type:* `String.t`, *default:* `nil`) - The type of notification channel, such as "email" and "sms". To view the full list of channels, see Channel descriptors (https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). Notification channel types are globally unique.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :labels => list(GoogleApi.Monitoring.V3.Model.LabelDescriptor.t()) | nil,
          :launchStage => String.t() | nil,
          :name => String.t() | nil,
          :supportedTiers => list(String.t()) | nil,
          :type => String.t() | nil
        }

  field(:description)
  field(:displayName)
  field(:labels, as: GoogleApi.Monitoring.V3.Model.LabelDescriptor, type: :list)
  field(:launchStage)
  field(:name)
  field(:supportedTiers, type: :list)
  field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Monitoring.V3.Model.NotificationChannelDescriptor do
  def decode(value, options) do
    GoogleApi.Monitoring.V3.Model.NotificationChannelDescriptor.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Monitoring.V3.Model.NotificationChannelDescriptor do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
